package com.tw.modules.serviceImpl;

import com.tw.modules.entity.Diary;
import com.tw.modules.dao.DiaryMapper;
import com.tw.modules.service.DiaryService;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author maxiaodong
 * @since 2018-04-07
 */
@Service
public class DiaryServiceImpl extends ServiceImpl<DiaryMapper, Diary> implements DiaryService {
	@Autowired
	DiaryMapper dao;
	
	/**
	 * 根据phone和date查询用户记录表
	 */
	public Diary selectByPhoneAndDate(long phone,String date){
		return dao.selectByPhoneAndDate(phone, date);
	}

	@Override
	public List<Diary> selectByPhone(long phone) {
		
		return dao.selectByPhone(phone);
	}
}
